<?php
//include("chk.php");
include("common/conn.php");
include("common/publicFun.php");
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>管理员登陆日志</title>
<link href="images/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript" src="js/common.js"></script>
<script language="JavaScript" type="text/JavaScript" src="js/jQuery1.6.2.js"></script>
<script language="JavaScript" type="text/JavaScript" src="js/dialog/dialog.js"></script>
<script>
$(document).ready(function(){
  //$(".tab tr:gt(0) td:not('.title_all')").css('padding','5px');
  $('input[name=switch]').click(function(){
   $('input[name=checkbox]').attr('checked',$(this).attr('checked')==undefined?false:true);
  });

  $(".tab tr:not('.no')").mouseover(function(event){
    $(this).children("td").css('background','#c1ebff')
    this.style.backgroundColor='#c1ebff';
  }).mouseout(function(event){
    this.style.backgroundColor='';
    $(this).children("td").css('background','#ffffff').css("color","#000000");
  }).click(function(event){
    this.style.backgroundColor='#51b2f6';
    $(this).children("td").css('background','#51b2f6').css("color","#FFFFFF");
  });
  //删除选中日志
  $(".delcheckbox").click(function(){
    var str='';
    $(".tab input[name=checkbox]:checked").each(function(){
      str+=$(this).val()+',';
    });
    str=str.substring(0,str.length-1);
    if(chk_Batch_PKEY(str)){
      art.dialog.confirm('你确认删除选中的日志吗？',function(){
        $.post("myRun/managerlog_del.php",{id:str},function(tips){
          if(tips=='ok'){
            art.dialog.through({title:'信息',icon:'face-smile',content:'删除成功',ok:function(){art.dialog.close();location.reload();}});
          }else{
            art.dialog.tips('删除失败');
          }
        });
        return true;
      });
    }else{
      art.dialog.through({title:'信息',icon:'face-sad',content:'请选择删除的日志',ok:function(){art.dialog.close();}});
    }
  }).addClass("pointer");

  //del event
  $(".del").bind("click",function(event){
    var _tmpQuery=$(this);
    var id=$("input[name='id']",$(this).parents("form:first")).attr("value");
    art.dialog.confirm('你确认删除该日志吗？',function(){
     $.post("myRun/managerlog_del.php",{id:id},function(tips){
        if(tips=='ok'){
          art.dialog.tips('成功删除');
          $(_tmpQuery.parents('tr:first')).hide();
        }else{
          art.dialog.tips(tips,5);
        }
      });
      return true;
    });
  });
});
</script>
</head>
<body>
</body>
</html>